home *** CD-ROM | disk | FTP | other *** search
/ Kompuutteri Kaikille K-CD 2008 #18 / KCD200818.ISO / Vista Sidebar Styler / WindowsSidebarStyler_x64.msi / _0F246D5C36B57C41D730A4E83DDB39C4 / _21214734DD044021A9867979B8F59D14 / Hello World / Sources / App.xaml.cs < prev    next >
Text File  |  2007-01-17  |  843b  |  32 lines

  1. using System;
  2. using System.Windows;
  3. using System.Data;
  4. using System.Xml;
  5. using System.Configuration;
  6.  
  7. namespace TestGadget
  8. {
  9.     /// <summary>
  10.     /// Interaction logic for App.xaml
  11.     /// </summary>
  12.  
  13.     public partial class App : System.Windows.Application
  14.     {
  15.         protected override void OnStartup(StartupEventArgs e)
  16.         {
  17.             base.OnStartup(e);
  18.             MainWindow = new Window();
  19.             MainWindow.Background = System.Windows.Media.Brushes.Transparent;
  20.             MainWindow.AllowsTransparency = true;
  21.             MainWindow.WindowStyle = WindowStyle.None;
  22.             MainWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
  23.             MainWindow.Content = new Window1();
  24.             MainWindow.SizeToContent = SizeToContent.WidthAndHeight;
  25.             MainWindow.MouseLeftButtonDown += delegate
  26.             {
  27.                 MainWindow.DragMove();
  28.             };
  29.             MainWindow.ShowDialog();
  30.         }
  31.     }
  32. }